<!-- html -->
<template>
  <h2 class="h2">路由跳转</h2>
  <!-- push模式，字符串写法 -->
  <RouterLink class="routerLink1" to="/routeHome/routeTest1/routeTest1Home">首页</RouterLink>
  <!-- push模式，对象写法，路径跳转 -->
  <RouterLink class="routerLink1" :to="{ path: '/routeHome/routeTest1/routeTest1Page1' }">页面1</RouterLink>

  <!-- replace模式，对象写法，名称跳转 -->
  <RouterLink class="routerLink1" replace :to="{ name: 'routeTest1Page2' }">页面2</RouterLink>
  <hr class="hr1">
  <RouterView />
</template>

<!-- js或ts -->
<script lang="ts">
export default {
  name: 'routeTest1'
}
</script>

<!-- js或ts -->
<script setup lang="ts">
</script>

<!-- 样式 -->
<style scoped></style>